package com.ruoyi.flowable.config;

import org.flowable.spring.SpringProcessEngineConfiguration;
import org.flowable.spring.boot.EngineConfigurationConfigurer;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;

/**
 * @program: RuoYi-Vue
 * @description: flowableconfig
 * @author: jhw
 * @create: 2021-03-29 17:41
 **/
@Configuration
public class FlowableEnginConfig implements EngineConfigurationConfigurer<SpringProcessEngineConfiguration> {

    @Value("${ruoyi.flowable.font-name}")
    private  String flowableFontName;

    @Override
    public void configure(SpringProcessEngineConfiguration engineConfiguration) {
        //设置字体
        engineConfiguration.setActivityFontName(flowableFontName);
        engineConfiguration.setLabelFontName(flowableFontName);
        engineConfiguration.setAnnotationFontName(flowableFontName);
    }
}
